package com.xjscrm.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjscrm.console.dto.circle.CircleTaskPublishDTO;
import com.xjscrm.console.entity.CircleTaskPublish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mingyang.chen create in 2024/4/9 上午10:33
 */
@Mapper
public interface CircleTaskPublishMapper extends CommonMapper<CircleTaskPublish> {

    int deleteByPrimaryKey(Long id);

    int insertSelective(CircleTaskPublish record);

    CircleTaskPublish selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CircleTaskPublish record);

    List<CircleTaskPublish> selectListByTaskId(@Param("merId") Long merId, @Param("taskId") Long taskId);

    void deleteByTaskId(@Param("merId") Long merId, @Param("taskId") Long taskId);

    void updateStatusToSending(@Param("merId") Long merId, @Param("id") Long id);

    List<CircleTaskPublish> selectPage(Page<CircleTaskPublish> page, @Param("query") CircleTaskPublishDTO source);

    void updateStatusFail(@Param("merId") Long merId, @Param("id") Long id, @Param("remark") String remark);
}